// pages/details-sellerinformation/details-sellerinformation.js
let sellerID
let phone
Page({
  data: {
    mation:[],
    list:[]
  },

  onLoad(options) {
    sellerID = options.sellerID
    this.getsellerGoods()
    wx.cloud.database().collection('user-information')
    .where({
      _openid:sellerID
    })
    .get()
    .then(res=>{
      this.setData({
        mation:res.data[0]
      })

    })
  },
 getsellerGoods(){
   wx.cloud.database().collection('send-Goods')
   .where({
     _openid:sellerID
   })
   .get()
   .then(res=>{
     phone = res.data[0].phone
     this.setData({
      list:res.data
     })
   })
 },
 contact(){
  wx.showModal({
    title: '商家联系方式',
     content: phone,
     confirmText:'确定',
     cancelText:'返回',
     success: (res) =>{
       if (res.confirm) {
           //点击符合按钮
       } else if (res.cancel) {
           //点击不符合按钮
       }
     }
 })
},
})